﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Linq.Expressions;

namespace Kkc.Application.Specifications
{
    public class GenericSpecification<T>: Specification<T>
    {
        public GenericSpecification(Expression<Func<T, bool>> expression)
        {
            if (expression == null)
                throw new ArgumentNullException("expression");

            this.expression = expression;
        }

        private readonly Expression<Func<T, bool>> expression;

        public override Expression<Func<T, bool>> Expression
        {
            get { return expression; }
        }
    }
}